import Vue from 'vue'
import Router from 'vue-router'
import VueCookies from 'vue-cookies'
//import HelloWorld from '@/components/HelloWorld'
import Login from '@/components/login/Login' //引入根目录下的Login.Vue组件

//参考：https://www.cnblogs.com/lsy0403/p/8882414.html

Vue.use(VueCookies) //全局注册Cookies组件
Vue.use(Router) //Vue全局使用Router


const first = { template: '<div>first内容</div>' }
const second = { template: '<div>second内容</div>' }

export default new Router({
  routes: [
    // {
    //   path: '/', //链接路径
    //   name: 'HelloWorld', //路由名称
    //   component: HelloWorld //对应的组件模版
    // },
    { path: '/', name: 'login', component: Login },
    { path: '/first', name: 'first', component: first },
    { path: '/second', name: 'second', component: second }
  ]
})
